#ifndef _UART_DRV_H__
#define _UART_DRV_H__

#include "STC32G_UART.h"
#include "STC32G_Switch.h"
#include "STC32G_NVIC.h"
#include "queue.h"
#include "sys_tim.h"

#define INTVAL  20

typedef struct
{ 
    RingBuffer_t *queue;
    u32 timeOut;
    void (*send)(uint8_t *dat, uint16_t len);
}UARTx_t;

void UART_Init(void);
extern UARTx_t uart1;
extern UARTx_t uart2;

#endif /* _UART_DRV_H__ */
